import { takeLatest } from 'redux-saga';
import { fork } from 'redux-saga/effects';
import { STARTUP } from '../redux/startup';
import startup from './startup';
import { userSagas } from './user';
import { postSagas } from './post';
import { resourceSagas } from './resource';

// 当action触发时，执行特定saga
export default function* root() {
  // yield [
  //   takeLatest(STARTUP, startup),
  //   takeLatest('user/wechatLogin', wechatLogin),
  // ];
  yield fork(userSagas);
  yield fork(postSagas);
  yield fork(resourceSagas);
}
